<!-- "script/apps/Aries/Creator/Game/Tasks/Dock/DockPage.html" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<pe:mcml>
<script type="text/npl" src="DockPage.lua" refresh="false"><![CDATA[
    NPL.load("(gl)script/apps/Aries/Creator/Game/game_logic.lua");
    local GameLogic = commonlib.gettable("MyCompany.Aries.Game.GameLogic")
    local DockPage = NPL.load("(gl)script/apps/Aries/Creator/Game/Tasks/Dock/DockPage.lua");
    local HttpWrapper = NPL.load("(gl)script/apps/Aries/Creator/HttpAPI/HttpWrapper.lua");

    function ds_top_line_1(index)
        if(index == nil) then
            return #DockPage.top_line_1;
        else
            return DockPage.top_line_1[index];
        end
    end
    function ds_top_line_2(index)
        if(index == nil) then
            return #DockPage.top_line_2;
        else
            return DockPage.top_line_2[index];
        end
    end
    function ds_top_line_3(index)
        if(index == nil) then
            return #DockPage.top_line_3;
        else
            return DockPage.top_line_3[index];
        end
    end
    function OnClickTop(id)
        DockPage.OnClickTop(id)
    end
    function OnClick(id)
        DockPage.OnClick(id)
    end
    function RenderButton_1(index)
        return DockPage.RenderButton_1(index);
    end
    function RenderButton_2(index)
        return DockPage.RenderButton_2(index);
    end
    function CanShowVip()
        if not DockPage.IsInSchoolAndInLearnTime() then
            return false
        end
        local list = DockPage.hide_vip_world_ids[HttpWrapper.GetDevVersion()];
        if(list)then
			local projectId = GameLogic.options:GetProjectId();
            projectId = tonumber(projectId);
            for k,id in ipairs(list) do
                if(id == projectId)then
                    return false;
                end
            end
        end
        return true;
    end

    function CanShowFriendRedTip()
        return DockPage.show_friend_red_tip;
    end

    function CanShowCampVip()
        return DockPage.CanShowCampVip();
    end
]]></script>
    <pe:container ClickThrough="true" alignment="_rt" style="position:relative;margin-top:10px;margin-right:205px;height:270px;background:;">
        <div style="width:600px;height:90px;">
            <pe:gridview name="gridview_1" style="position:relative;width:600px;height:90px;" AllowPaging="false" CellPadding="0" ItemsPerLine="6" DefaultNodeHeight = "75" pagesize="6"
                DataSource='<%=ds_top_line_1%>'>
	            <Columns>
                    <div style="width:100px;height:80px;">
                        <pe:if condition='<%= (Eval("enabled") == true) %>' >
                            <%= RenderButton_1(Eval("index"))%>
                        </pe:if>
                    </div>
	            </Columns>
	            <PagerSettings Position="Top" height="0" PreviousPageText="" NextPageText=""/>
            </pe:gridview>

        </div>
        <div style="margin-top:-10px;width:600px;height:90px;">
            <pe:gridview name="gridview_2" style="width:600px;height:90px;" AllowPaging="false" CellPadding="0" ItemsPerLine="6" DefaultNodeHeight = "75" pagesize="6"
                DataSource='<%=ds_top_line_2%>'>
	            <Columns>
                    <div style="width:100px;height:80px;">
                        <pe:if condition='<%= (Eval("enabled2") == true) %>' >
                            <%= RenderButton_2(Eval("index"))%>
                        </pe:if>
                    </div>
	            </Columns>
	            <PagerSettings Position="Top" height="0" PreviousPageText="" NextPageText=""/>
            </pe:gridview>
        </div>        
    </pe:container>    
    <pe:container ClickThrough="true" alignment="_ctb" style="position:relative;height:130px; background:;">
        <div style="margin-top:0px;">
            <div style="float:left;margin-left:-20px;">
                <!--创造-->
                <input type="button" name='work' onclick="OnClick" style="width:137px;height:132px;background:url(Texture/Aries/Creator/keepwork/dock/btn_chuangzao_32bits.png#0 0 137 132)"/>
            </div>
            <div style="float:left;margin-left:-20px;">
                <!--探索-->
                <input type="button" name='explore' onclick="OnClick" style="width:137px;height:132px;background:url(Texture/Aries/Creator/keepwork/dock/btn_tansuo_32bits.png#0 0 137 132)"/>
            </div>
            <div style="float:left;margin-left:-20px;">
                <!--知识-->
                <input type="button" name='study' onclick="OnClick" style="width:137px;height:132px;background:url(Texture/Aries/Creator/keepwork/dock/btn_zhishi_32bits.png#0 0 137 132)"/>
            </div>                       
        </div>        
    </pe:container>
    <pe:container ClickThrough="true" alignment="_rb" style="position:relative;height:90px; background:;">
        <div style="float:right;margin-right:-7px;">
            <!--人物-->
            <input type="button" name='character' onclick="OnClick" style="width:85px;height:80px;background:url(Texture/Aries/Creator/keepwork/dock/btn2_renwu_32bits.png#0 0 85 80)"/>
        </div>            
        
        <div  style="float:right;margin-right:-7px;">
            <!--家园-->
            <input type="button" name='home' onclick="OnClick" style="width:85px;height:80px;background:url(Texture/Aries/Creator/keepwork/dock/btn2_home_32bits.png#0 0 85 80)"/>
        </div>
        <div  style="float:right;margin-right:-7px;">
            <!--学校-->
            <input type="button" name='school' onclick="OnClick" style="width:85px;height:80px;background:url(Texture/Aries/Creator/keepwork/dock/btn2_xuexiao_32bits.png#0 0 85 80)"/>
        </div>  
        <pe:if condition="<%=not CanShowVip()%>">
            <div  style="float:right;margin-right:7px;">
                <!--好友-->
                <input type="button" name='friends' onclick="OnClick" style="width:85px;height:80px;background:url(Texture/Aries/Creator/keepwork/dock/btn2_haoyou_32bits.png#0 0 85 80)"/>
                <pe:if condition="<%=CanShowFriendRedTip()%>">
                    <kp:redtip style="position:relative;margin-left:72px;margin-top:-76px;" value="true" ></kp:redtip>
                </pe:if>                
            </div>  
        </pe:if>                    
        <pe:if condition="<%=CanShowVip()%>">
            <div  style="float:right;margin-right:-7px;">
                <!--好友-->
                <input type="button" name='friends' onclick="OnClick" style="width:85px;height:80px;background:url(Texture/Aries/Creator/keepwork/dock/btn2_haoyou_32bits.png#0 0 85 80)"/>
                <pe:if condition="<%=CanShowFriendRedTip()%>">
                    <kp:redtip style="position:relative;margin-left:72px;margin-top:-76px;" value="true" ></kp:redtip>
                </pe:if>                
            </div>  
            <div  style="float:right;margin-right:7px;">
                <!--会员-->
                <input type="button" name='vip' onclick="OnClick" style="width:85px;height:80px;background:url(Texture/Aries/Creator/keepwork/dock/btn2_huiyuan_32bits.png#0 0 85 80)"/>
            </div>
        </pe:if> 
    </pe:container>
    <pe:if condition="<%=not System.os.IsTouchMode()%>">
        <pe:container ClickThrough="true" alignment="_ctr" style="margin-top: -45px;position:relative;height:90px; background:;">
            <div style="float:right;margin-right:0px;">
                <!--资源-->
                <!-- <img ClickThrough="true" style="position: relative;margin-left: 5;margin-top: -7;" uiname="animator" zorder="1" class="animated_btn_overlay" width="180" height="68"/> -->
                <input type="button" name='mall' onclick="OnClick" style="width:198px;height:82px;background:url(Texture/Aries/Creator/keepwork/dock/btn_ziyuan_32bits.png#0 0 198 82)"/>
                
            </div>                
        </pe:container>
    
        <pe:container ClickThrough="true" alignment="_ctr" style="margin-top: 25px; height:90px; background:;">
            <div style="float:right;margin-right:0px;">
                <!--资源-->
                <!-- <img ClickThrough="true" style="position: relative;margin-left: 5;margin-top: -7;" uiname="animator" zorder="1" class="animated_btn_overlay" width="180" height="68"/> -->
                <input type="button" name='school_center' onclick="OnClick" style="width:198px;height:82px;background:url(Texture/Aries/Creator/keepwork/dock/btn_xiaoyuan_32bits.png#0 0 198 82)"/>
                
            </div>                
        </pe:container>
    </pe:if> 

    <pe:if condition="<%=System.os.IsTouchMode()%>">
        <pe:container ClickThrough="true" alignment="_ctr" style="margin-top: -40px;position:relative;height:90px; background:;">
            <div style="float:right;margin-right:0px;">
                <!--资源-->
                <!-- <img ClickThrough="true" style="position: relative;margin-left: 5;margin-top: -7;" uiname="animator" zorder="1" class="animated_btn_overlay" width="180" height="68"/> -->
                <input type="button" name='mall' onclick="OnClick" style="width:158px;height:65px;background:url(Texture/Aries/Creator/keepwork/dock/btn_ziyuan_32bits.png#0 0 198 82)"/>
                
            </div>                
        </pe:container>
    
        <pe:container ClickThrough="true" alignment="_ctr" style="margin-top: 10px; height:90px; background:;">
            <div style="float:right;margin-right:0px;">
                <!--资源-->
                <!-- <img ClickThrough="true" style="position: relative;margin-left: 5;margin-top: -7;" uiname="animator" zorder="1" class="animated_btn_overlay" width="180" height="68"/> -->
                <input type="button" name='school_center' onclick="OnClick" style="width:158px;height:65px;background:url(Texture/Aries/Creator/keepwork/dock/btn_xiaoyuan_32bits.png#0 0 198 82)"/>
                
            </div>                
        </pe:container>
    </pe:if> 
    
    <pe:container zorder= "-1" ClickThrough="true" height="100" alignment="_mb" style="position:relative; background:url(Texture/Aries/Creator/keepwork/dock/jianbian-xia_32bits.png#0 0 32 99:8 25 8 25);"></pe:container>
    <pe:container ClickThrough="true" zorder="-1"  alignment="_mt" style="position:relative;margin-top:0px;margin-right:205px;height:270px;background:url(Texture/Aries/Creator/keepwork/dock/jianbian-shang_32bits.png#0 0 32 128:8 32 8 32);"></pe:container>
</pe:mcml> 
</body>
</html>